<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
	xmlns:h="http://xmlns.jcp.org/jsf/html"
	xmlns:f="http://xmlns.jcp.org/jsf/core"
	xmlns:pt="http://xmlns.jcp.org/jsf/passthrough"
	xmlns:p="http://primefaces.org/ui">
<f:view>
	<f:metadata>
		<f:viewAction action="#{menuMB.updateMenu(21)}" />
	</f:metadata>
	<ui:composition template="/WEB-INF/templates/defaultLayout.xhtml">
		<!-- Definiendo la cabecera de la pagina -->
		<ui:define name="title">
			<h:outputText value="Persona juridica" />
		</ui:define>

		<!-- Definiendo el cuerpo de la pagina -->
		<ui:define name="content">

			<h:outputStylesheet library="css" name="main.css" />
			<br></br>

			<div style="margin-left: 50px;">
				<div>
					<div>
						<div class="p6n-api-consent-screen-title">BUSCAR PERSONA
							JURIDICA</div>
						<div>
							<h:form>
								<div class="p6n-api-consent-screen-input-section">
									<div>
										<div style="float: left;">
											<h:inputText id="txtSearched"
												value="#{administrarPersonajuridicaBean.searched}"
												maxlength="50" size="50" required="true"
												onkeyup="this.value = this.value.toUpperCase();"
												pt:placeholder="RUC / Razón Social" />
										</div>
										<div style="float: left;">
											<h:commandLink
												action="#{administrarPersonajuridicaBean.buscarPersona()}"
												styleClass="button" style="margin: 0 0 0 1px;">
												<span class="icon icon198"></span>
											</h:commandLink>
										</div>
									</div>
								</div>
								<div
									class="p6n-api-consent-screen-input-error p6n-api-consent-screen-product-name-error-msg"
									style="float: inherit;">
									<h:message for="txtSearched" />
								</div>
								<br />
								<br />
							</h:form>
						</div>
					</div>
				</div>
			</div>

			<br />
			<h:form>
				<div>
					<div class="buttons p6n-api-consent-screen-inputs"
						style="margin-left: 39px;">
						<div class="tiptip">
							<h:commandLink action="create?faces-redirect=true"
								styleClass="button left" title="Nueva bóveda">
								<span class="icon icon3"></span>
								<span class="label">Nuevo</span>
							</h:commandLink>
						</div>
					</div>

					<div class="p6n-api-consent-screen-inputs">
						<div class="p6n-content ng-scope">
							<div class="p6n-content-no-nav ng-scope">
								<div class="p6n-main-pane ng-isolate-scope"
									style="margin-top: 0px;">
									<div>
										<div class="ng-scope">
											<p:dataTable var="persona"
												value="#{administrarPersonajuridicaBean.tablaPersonajuridica.rows}"
												selectionMode="single"
												selection="#{administrarPersonajuridicaBean.personajuridica}"
												rowKey="#{persona}" rowIndexVar="row">
												<p:column headerText="Nro" width="5%"
													style="text-align:center;">
													<h:outputText value="#{row + 1}" />
												</p:column>
												<p:column headerText="TIPO DOCUMENTO"
													style="text-align:center;">
													<h:outputText value="#{persona.tipodocumento.abreviatura}" />
												</p:column>
												<p:column headerText="NUMERO DOCUMENTO">
													<h:outputText value="#{persona.numerodocumento}" />
												</p:column>
												<p:column headerText="RAZON SOCIAL">
													<h:outputText value="#{persona.razonsocial}" />
												</p:column>
												<p:column headerText="TIPO EMPRESA">
													<h:outputText value="#{persona.tipoempresa.denominacion}" />
												</p:column>
												<p:column headerText="FECHA CONSTITUCION"
													style="text-align:center;">
													<h:outputText value="#{persona.fechaconstitucion}">
														<f:convertDateTime pattern="dd/MM/yyyy" />
													</h:outputText>
												</p:column>
												<p:column headerText="STATUS">
													<h:button value="Edit" outcome="update"
														styleClass="action green" style="margin: 0px;"
														target="_blank">
														<f:param name="id" value="#{persona.idpersonajuridica}" />
													</h:button>
												</p:column>
											</p:dataTable>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</h:form>
		</ui:define>

	</ui:composition>
</f:view>
</html>